CC= gcc
LDFLAGS= -g
CFLAGS= -Wall -O2 -g
GET=co

define all_sources
    ( find ./ -name '*.[ch]' -print)
endef

PROJECT_SRCS=vsa.c core_main.c sys_main.c \
	inter_main.c\
	sys_output.c
PROJECT_OBJS=vsa.o core_main.o sys_main.o \
	inter_main.o\
	sys_output.o
	

LINK = $(CC) $(LDFLAGS) -o $@ 

.PHONY: all install uninstall cscope

all: vsa

vsa: $(PROJECT_OBJS)
	$(LINK) $(PROJECT_OBJS)

install:
	cp ./vsa /usr/bin

uninstall:
	rm /usr/bin/vsa

clean: 
	rm -fr vsa *~ *.o *.bak core

cscope:
	$(all_sources) > cscope.files
	cscope -k -b -q
